import request from '@/utils/request'

// 查询签到列表
export function listBrand (query) {
  return request({
    url: '/prod-api/system/rule/list',
    method: 'get',
    params: query
  })
}

export function bulidBrandSelect () {
  return request({
    url: '/prod-api/system/rule/bulidSelect',
    method: 'get'
  })
}

// 修改签到状态
export function updateBrandStatus (signId, dataStatus) {
  const data = {
    signId,
    dataStatus
  }
  return request({
    url: '/prod-api/system/rule/updateBrandStatus',
    method: 'put',
    data: data
  })
}

// 查询签到详细
export function getBrand (signId) {
  return request({
    url: '/prod-api/system/rule/' + signId,
    method: 'get'
  })
}

// 新增签到
export function addBrand (data) {
  return request({
    url: '/prod-api/system/rule',
    method: 'post',
    data: data
  })
}

// 修改签到
export function updateBrand (data) {
  return request({
    url: '/prod-api/system/rule/updateBrand',
    method: 'put',
    data: data
  })
}

// 删除签到
export function delBrand (brandUid) {
  return request({
    url: '/prod-api/system/rule/' + brandUid,
    method: 'delete'
  })
}

// 添加签到规则
export function addSignRule (data) {
  return request({
    url: '/prod-api/system/detail/add',
    method: 'post',
    data: data
  })
}

// 编辑签到规则
export function editSignRule (data) {
  return request({
    url: '/prod-api/system/detail/edit',
    method: 'put',
    data: data
  })
}

// 签到规则详情
export function getSignListRule (query) {
  return request({
    url: '/prod-api/system/detail/list',
    method: 'get',
    params: query
  })
}

